﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LstPayment.ascx.cs" Inherits="Web.Cms.Payment.LstPayment" %>
<%@ Import Namespace="Module.Core.BusinessLogic" %>

<%@ Register TagPrefix="uc1" TagName="PagingAjax" Src="~/Cms/AjaxCP/Paging.ascx" %>
<script type="text/javascript">
    $(function () {
        $("#<%=txtDatefrom.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
        $("#<%=txtDateTo.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/images/calendar_1.gif', buttonImageOnly: true });
    });
</script>
<div class="fl" style="padding-bottom: 20px;">
    <p class="heading" style=" text-align:center;">
        DANH SÁCH KHÁCH HÀNG NẠP GOLD QUA ATM BẢO KIM</p>
</div>
<br />
<div style="clear:both;">
    <asp:Label ID="lblMessage" runat="server" Font-Bold="true" Font-Size="11px" 
        ForeColor="red"></asp:Label>
</div>
<table align="center" style="margin-left:250px" width="800px">
    <tr>
         <td class="style1">
            <strong>Tên khách hàng:</strong></td>
        <td>
            <asp:TextBox ID="txtKeysearch" runat="server" Height="20px" Text=""></asp:TextBox>
        </td>
        <td class="style1">
            <strong>Từ ngày(yy/mm/dd):</strong></td>
        <td>
            <asp:TextBox ID="txtDatefrom" runat="server" Height="20px"></asp:TextBox>
        </td>
        <td class="style1">
            <strong>Đến ngày:</strong></td>
        <td>
            <asp:TextBox ID="txtDateTo" runat="server" Height="20px"></asp:TextBox>
        </td>
        <td>
            <asp:Button ID="btnTimKiem" runat="server" CssClass="Button_Search" 
                onclick="btnTimKiem_Click" />
        </td>
        <td>
            &nbsp;</td>
    </tr>
    </table>
<br />
<asp:GridView ID="grdPayment" runat="server" AutoGenerateColumns="False" 
    BackColor="White"  SkinID="AdminGridView" 
    EnableModelValidation="True"
    onrowdatabound="grdPayment_RowDataBound" 
    onrowcommand="grdPayment_RowCommand">
    <Columns>
        <asp:BoundField HeaderText="STT">
        <ItemStyle HorizontalAlign="Center" Width="20px" />
        <HeaderStyle HorizontalAlign="Center" />
        <ItemStyle />
        </asp:BoundField>        
        <asp:BoundField DataField="order_id" HeaderText="Mã giao dịch" />
        <asp:TemplateField HeaderText="Hình thức thanh toán">
           <ItemTemplate>
                <%# PaymentBL.GetPayment_type(Convert.ToInt32(Eval("payment_type")))%>
           </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trạng thái giao dịch">
            <ItemTemplate>
                 <%#PaymentBL.Gettransaction_status((Eval("transaction_status").ToString()))%>
            </ItemTemplate>
        </asp:TemplateField>
         <asp:TemplateField HeaderText="Tổng tiền thanh toán">
            <ItemTemplate>
                 <%# string.Format("{0:0,0}", Eval("total_amount"))%>
            </ItemTemplate>
        </asp:TemplateField>                 
         <asp:TemplateField HeaderText="Số tiền nạp">
            <ItemTemplate>
                 <%# string.Format("{0:0,0}", Eval("net_amount"))%>
            </ItemTemplate>
        </asp:TemplateField> 
        <asp:BoundField HeaderText="Tên người thanh toán" DataField="customer_name"></asp:BoundField>
        <asp:BoundField DataField="created_on" HeaderText="Ngày giao dịch" />
        <asp:BoundField HeaderText="Email " DataField="customer_email" />
        <asp:BoundField HeaderText="Số điện thoại" DataField="customer_phone" />
        <asp:BoundField HeaderText="Địa chỉ" DataField="customer_address" />
        <asp:TemplateField HeaderStyle-Width="20" HeaderText="Xóa">
            <ItemTemplate>
                <asp:Button ID="btnDelete" runat="server" 
                    CommandArgument='<%# Eval("Id") %>' CommandName="Commanddelete" 
                    CssClass="Icon_Delete" 
                    OnClientClick="return confirm('Bạn có chắc chắn xóa không ?')" />
            </ItemTemplate>
            <HeaderStyle Width="20px" />
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<p style="text-align:center;">
    <br />            
    <asp:Label runat="server" ID="lbTotal" Font-Bold="true" Font-Size="15px" ForeColor="red"></asp:Label>            
    <br />  <br />
                
            <uc1:PagingAjax ID="PagingAjax1" runat="server" /> 
    <p>
    <br />
    <br />
</p>
